<style lang="less" scoped>
  .datagrid-box{
    padding: 15px;
  }
</style>
<template>
  <div class="datagrid-box">
    <Table border :columns="columns2" :data="data3"></Table>
  </div>
</template>
<script>
  export default {
    name: 'datagrid',
    components: {

    },
    data() {
      return {
        columns2: [
          {
            title: 'Name',
            key: 'name',
            width: 100
          },
          {
            title: 'Age',
            key: 'age',
            width: 100
          },
          {
            title: 'Province',
            key: 'province',
            width: 100
          },
          {
            title: 'City',
            key: 'city',
            width: 200
          },
          {
            title: 'Address',
            key: 'address'
          },
          {
            title: 'Postcode',
            key: 'zip',
            width: 100
          },
          {
            title: 'Action',
            key: 'action',
            width: 120,
            render: (h, params) => {
              return h('div', [
                h('Button', {
                  props: {
                    type: 'text',
                    size: 'small'
                  }
                }, '详情'),
                h('Button', {
                  props: {
                    type: 'text',
                    size: 'small'
                  }
                }, '编辑')
              ]);
            }
          }
        ],
        data3: [
          {
            name: 'John Brown',
            age: 18,
            address: 'New York No. 1 Lake Park',
            province: 'America',
            city: 'New York',
            zip: 100000
          },
          {
            name: 'Jim Green',
            age: 24,
            address: 'Washington, D.C. No. 1 Lake Park',
            province: 'America',
            city: 'Washington, D.C.',
            zip: 100000
          },
          {
            name: 'Joe Black',
            age: 30,
            address: 'Sydney No. 1 Lake Park',
            province: 'Australian',
            city: 'Sydney',
            zip: 100000
          },
          {
            name: 'Jon Snow',
            age: 26,
            address: 'Ottawa No. 2 Lake Park',
            province: 'Canada',
            city: 'Ottawa',
            zip: 100000
          }
        ]
      }
    },
    computed: {

    },
    methods: {

    },
    watch:{

    },
    mounted(){

    },
    created(){

    }
  }
</script>

